package com.iyunwen.datatool.dao;

import com.iyunwen.datatool.model.dbdo.EventDataDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;
import java.util.List;

/**
 * @description:
 * @author: Zhu.Guodong
 * @create: 2020-03-17 11:20
 * @version:
 */
@Mapper
@Repository
public interface EventDataMapper {

    /**
     * 创建表
     * @param tableName
     * @return
     */
    void createTable(@Param("tableName") String tableName);

    /**
     * 批量插入数据
     * @param eventDataList
     * @param tableName
     */
    void insertBatch(@Param("eventDataList")List<EventDataDO> eventDataList,@Param("tableName")String tableName);

    /**
     * 查询关注的集合
     * @return
     */
    List<EventDataDO> selectNoticeData(@Param("tableName") String tableName);

    /**
     * 查询某个记录前后时间段的数据
     * @param tableName
     * @param eventTime
     * @param rangeTime
     * @return
     */
    List<EventDataDO> selectRangeData(@Param("tableName") String tableName, @Param("eventTime") String eventTime, @Param("rangeTime")int rangeTime);
}
